<?php

use NoahBuscher\Macaw\Macaw;

require_once '../vendor/autoload.php';

Macaw::get('/', function (){
    echo 'Hi, macaw';
});
$abc = 123;
Macaw::post('/test', function (){
    echo 'Hi, macaw test';
});

Macaw::get('/users', 'App\Controller\UserController@index');
/*
Macaw::get('/test', function () use ($abc){
    echo 'Hi, macaw test' . $abc;
});
*/

Macaw::get('/users/(:num)/a/(:any)', function($id, $a) {
    echo 'Hi, users:' . $id . ' ==' . $a;
});
Macaw::dispatch();